﻿IF OBJECT_ID('up_Vendor_Visit_Distributions_MeterImages_SelectById') IS not NULL
DROP PROC up_Vendor_Visit_Distributions_MeterImages_SelectById

IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'up_Vendor_Visit_Distributions_MeterImages_SelectById')
	DROP PROCEDURE up_Vendor_Visit_Distributions_MeterImages_SelectById
GO


CREATE PROCEDURE [dbo].[up_Vendor_Visit_Distributions_MeterImages_SelectById] 
(
	@imageID int
)
AS

SELECT 
	Vendor_Distribution_Meters_MeterId as 'ID',
	Vendor_Distribution_PoleFk as 'PoleID',
	ImageFileName as 'FileName'
FROM 
	tb_Vendor_Distribution_Meters	 
WHERE
	Vendor_Distribution_Meters_MeterId = @imageID
